<?php

namespace app\zc\validate;

use think\Validate;

class NewsValidate extends Validate
{
    protected $rule = [
        'title'     => 'require',
        'image'     => 'require',
        'look_num'  => 'require|number',
        'author'    => 'require',
        'abstract'  => 'require',
        'content'   => 'require',
    ];

    protected $message = [
        'title.require'     => '标题不能为空',
        'image.require'     => '封面不能为空',
        'look_num.require'  => '浏览量不能为空',
        'look_num.number'   => '浏览量必须是数字',
        'author.require'    => '作者不能为空',
        'abstract.require'  => '简介不能为空',
        'content.require'   => '内容不能为空',
    ];
}
